
• Cluster can reduce the stress on db and can control the nodes in high level.
• Cluster is mainly used to re-send the commands from cloud to nodes
including selecting node, controlling node, supervising nodes.
select node
When cloud ask one idle cluster to create one virtual machine.
Cluster will find the idlest node in its nodes cluster, then startup vm on it.
Idlest means: used cpu, used memory, used disk are calculated according to some weight and the value is smallest.
Also, there must not bu vsHost and defaultGateway on this node.
Supervise node status
Nodes will report their status to cluster continually( like 5~10 seconds once), cluster will summary the status during one period(
like 2 minutes once) and then report to cloud.
Cloud will record the status into db and decide whether this node needs to migrate.
Details in the status that node report to cluster.
List<VmStatus> vmStatus; (vm status, like running, suspend, etc.)
NodeStatus status;(physical machine status, like running, shutdown..)
ReportMachineStatus nodeStatus;(physical status (not report every time), like cpu used)
List<ReportMachineStatus> vmInfos; (vm status details (not report every time), like vm cpu used.)
List<ReportLoadBalancer> lbInfos; (load balance status)
usedMemory; usedCpuRatio; usedDisk; totalDisk; totalMemory;
List<VmProgress> vmProgressList; (vm creating process)
back
cluster